<template>
  <Content :pageKey="pageKey" />
</template>

<script>
// Include file content for specified path
export default {
  name: "Include",
  props: {
    path: { //relative uri path
      type: String,
      default: ''
    }
  },

  computed: {

    pageKey: function () {
      const pages = this.$site['pages'];
      for (var i in pages) {
        if (pages[i].regularPath == this.path) {
          return pages[i].key
        }
      }

      return 'unknown'
    }
  }
}
</script>
